package lingnan.cn.edu.view;

import java.awt.Toolkit;

import javax.swing.JFrame;

public abstract class Base extends JFrame {
	
	public Base(int initWidth,int initHeigth,String title,Object ...params) {
		this.setTitle(title);
		this.setSize(initWidth,initHeigth);
		int width = Toolkit.getDefaultToolkit().getScreenSize().width;
		int height = Toolkit.getDefaultToolkit().getScreenSize().height;
		this.setLocation((width-getWidth())/2,(height-getHeight())/2);
		
		
		initView();
		
		
		this.setVisible(true);
		this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
	}
	
	protected abstract void initView();
	
	
}
